package com.patters.abstractfactory;

public class FactoryB implements AbstractFactory {

	@Override
	public AbstractProduct createProduct(String name) {
		if(name.equals("ProductB")){
			return new ProductB();
		}
		else{
			return null;
		}
	}

	@Override
	public AbstractCar createCar(String name){
		if(name.equals("CarB")){
			return new CarB();
		}
		else{
			return null;
		}
	}
	
}
